package org.lanplay.server.model;

import java.util.Comparator;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Entity
@Data
@EqualsAndHashCode(callSuper=true)
@Table(uniqueConstraints=@UniqueConstraint(columnNames="name"))
public class Game extends BaseVersionedIdentifiable {
	private static final long serialVersionUID = 1L;
	public static final Comparator<Game> CMP_GAME_NAME = new Comparator<Game>() {
		@Override
		public int compare(Game o1, Game o2) {
			return o1.name.compareTo(o2.name);
		}
	};

	private String name;
}
